{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<!-- 播放板块开始 -->
<iframe allowtransparency=true frameborder='0' scrolling='no' allowfullscreen=true class="play_object" id="play" src="https://jx.jsonplayer.com/player/?url={{ href }}"></iframe>
<!-- 播放板块结束 -->
<!-- 选集板块开始 -->
<ul class="decode_ul">
    <li class="decode_button" onclick="play1()">源一</li>
    <li class="decode_button" onclick="play2()">源二</li>
    <li class="decode_button" onclick="play3()">源三</li>
    <li class="decode_button" onclick="play4()">源四</li>
    {% if previous_episode %}
        <a class="episode" href="{{ play }}/{{ false_cid }}/{{ previous_episode }}/"><li>上一集</li></a>
    {% endif %}
    {% if next_set %}
        <a class="episode" href="{{ play }}/{{ false_cid }}/{{ next_set }}/"><li>下一集</li></a>
    {% endif %}
</ul>
<ul class="play_list">
    {% for play_list in play_lists %}
    <a class="{{ class }}" href="{{ play }}/{{ false_cid }}/{{ play_list.id }}/"><li>{{play_list.title}}</li></a>
    {% endfor %}
</ul>
<!-- 选集板块结束 -->
{% endblock %}
{% block javascritp %}
<script type="text/javascript">
    function play1(){
        var parent = $('iframe#play').parent(); 
        var newElement = '<iframe allowtransparency=true frameborder="0" scrolling="no" allowfullscreen=true class="play_object" id="play" src="https://vip.bljiex.com/?v={{ href }}"></iframe>'; 
        $('iframe#play').remove(); 
        parent.append(newElement); 
    }
    function play2(){
        var parent = $('iframe#play').parent(); 
        var newElement = '<iframe allowtransparency=true frameborder="0" scrolling="no" allowfullscreen=true class="play_object" id="play" src="https://api.qianqi.net/vip/?url={{ href }}"></iframe>'; 
        $('iframe#play').remove(); 
        parent.append(newElement); 
    }
    function play3(){
        var parent = $('iframe#play').parent(); 
        var newElement = '<iframe allowtransparency=true frameborder="0" scrolling="no" allowfullscreen=true class="play_object" id="play" src="https://jx.playerjy.com/?url={{ href }}"></iframe>'; 
        $('iframe#play').remove(); 
        parent.append(newElement); 
    }
    function play4(){
        var parent = $('iframe#play').parent(); 
        var newElement = '<iframe allowtransparency=true frameborder="0" scrolling="no" allowfullscreen=true class="play_object" id="play" src="https://jx.jsonplayer.com/player/?url={{ href }}"></iframe>'; 
        $('iframe#play').remove(); 
        parent.append(newElement); 
    }
</script>
{% endblock %}